<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="box"></div>
</body>
</html>
<script>
let box = document.getElementById("box");
console.time('a');
for(let i = 0; i < 10000; i++) {
  box.innerHTML = i;
}
console.timeEnd('a');

console.time('b');
let num = 0;
for(let i = 0; i < 10000; i++) {
  num = i;
}
box.innerHTML += num;
console.timeEnd('b');
</script>
